	/*
	 * 输入表单数据字段类型定义与显示
	 * 示例: 
     * $test_select4_list_temp_arr=D('Sy/Game')->order('pid_number desc')->getField('pid_number,pid_name');
     * $test_select4_list_arr=count($test_select4_list_temp_arr) && is_array($test_select4_list_temp_arr)?$test_select4_list_temp_arr:array();        
     * $test_select4_options = [0=>'请选择'] + $test_select4_list_arr;  	 
	 * $return_form_field_dict	=	array(
	 *			'name'	=>	array('inType' => 'text','required'=>1,'comments'=>'名称不能为空'),
	 *			'long_time'=>array('inType' => 'number','required'=>1,'min'=>20,'max'=>99,'step'=>0.1,'comments'=>'有效时长不能为空'), 	 
	 *			'desc'	=>	array('inType' => 'textarea'),
	 *            'status'  =>  array('inType' => 'radio','options'=>array('0'=>'关闭','1'=>'开启')),
	 *            'test_online_time'  =>  array('inType' => 'datetime'),      
	 *            'test_chk'  =>  array('inType' => 'checkbox','options'=>array('1'=>'胖','2'=>'壮','3'=>'美')),   
	 *            'test_select'  =>  array('inType' => 'select','options'=>array('0'=>'请选择','5'=>'勤奋','6'=>'好学')), 
	 *            'test_select2'  =>  array('inType' => 'select','multiple'=>1,'field_comma_split'=>1,'options'=>D('ChanPinGame')->getField('game_id, game_cname')),	  
	 *            'test_select3'  =>  array('inType' => 'select','options'=>array('1'=>'胖','2'=>'壮','3'=>'美'),'hidden'=>1),
	 *            'test_select4'  =>  array('inType' => 'select','required'=>1,'options'=>$test_select4_options), 
	 *            'text_img'=>    array('inType' => 'file','index'=>2),    
	 *            'text_conent'=>    array('inType' => 'editor'),	                                               
	 * );	 	  
	 */
    public function formFieldDict() {
	    <volist name="tableInfoArray" id="tableInfo" key="k">
	    	<if condition="strpos($tableInfo['column_comment'],'@foreign_key_select@') !== false">
				<php>
					$column_comment_arr=explode('@foreign_key_select@',$tableInfo[column_comment]);
					$key_val_str=$column_comment_arr[1];
					$key_val_temp_arr=explode(',',$key_val_str);
				</php>   
		        ${$tableInfo[$columnNameKey]}_list_temp_arr=D('{$key_val_temp_arr[0]}')->order('{$key_val_temp_arr[1]} desc')->getField('{$key_val_temp_arr[1]},{$key_val_temp_arr[2]}');
		        ${$tableInfo[$columnNameKey]}_list_arr=count(${$tableInfo[$columnNameKey]}_list_temp_arr) && is_array(${$tableInfo[$columnNameKey]}_list_temp_arr)?${$tableInfo[$columnNameKey]}_list_temp_arr:array();        
		        ${$tableInfo[$columnNameKey]}_options = [0=>'请选择'] + ${$tableInfo[$columnNameKey]}_list_arr; 		
	    	</if>
	    </volist>


        $return_form_field_dict	=	array(
		    <volist name="tableInfoArray" id="tableInfo" key="k">
                <if condition="$tableInfo['column_key'] neq 'PRI'">
                    <if condition="!(($tableInfo[$columnNameKey] eq 'add_time') AND ($tableInfo['data_type'] eq 'datetime')) AND !(($tableInfo[$columnNameKey] eq 'update_time') AND ($tableInfo['data_type'] eq 'datetime')) AND !(($tableInfo[$columnNameKey] eq 'add_admin_id') AND ($tableInfo['data_type'] eq 'int')) AND !(($tableInfo[$columnNameKey] eq 'add_admin_name') AND ($tableInfo['data_type'] eq 'varchar'))">
                        <if condition="$tableInfo['data_type'] eq 'datetime'">
					    		'{$tableInfo[$columnNameKey]}'=>array('inType' => 'datetime'),  
                        <else/>                        
					    	<if condition="strpos($tableInfo['column_comment'],'@foreign_key_select@') !== false">
					    		'{$tableInfo[$columnNameKey]}'=>array('inType' => 'select','required'=>1,'options'=>${$tableInfo[$columnNameKey]}_options), 					    		
							<elseif condition="strpos($tableInfo['column_comment'],':') !== false"/>
					    		<php>
					    			$column_comment_arr=explode(':',$tableInfo[column_comment]);
					    			$key_val_str=$column_comment_arr[1];
									$key_val_temp_arr=explode(',',$key_val_str);
									$key_val_arr=[];
									foreach($key_val_temp_arr as $v){
									    $temp_arr=explode('-',$v);
									    $key_val_arr[$temp_arr[0]]=$temp_arr[1];
									}
					    		</php>
					    		<if condition="($tableInfo['data_type'] eq 'int') OR ($tableInfo['data_type'] eq 'tinyint') OR ($tableInfo['data_type'] eq 'enum')">
					    			'{$tableInfo[$columnNameKey]}'=>array('inType' => 'select','options'=><if condition="!array_key_exists('0',$key_val_arr)">['0'=>'请选择']+</if>$this->{$tableInfo[$columnNameKey]}_range_arr), 					    		
					    		<else/>
					    			'{$tableInfo[$columnNameKey]}'=>array('inType' => 'select','options'=>[''=>'请选择']+$this->{$tableInfo[$columnNameKey]}_range_arr), 
					    		</if>
							<else/>
		                        <if condition="($tableInfo['data_type'] eq 'int') OR ($tableInfo['data_type'] eq 'tinyint') OR ($tableInfo['data_type'] eq 'smallint') OR ($tableInfo['data_type'] eq 'mediumint') OR ($tableInfo['data_type'] eq 'integer') OR ($tableInfo['data_type'] eq 'bigint')">    
							    	'{$tableInfo[$columnNameKey]}'=>array('inType' => 'number','required'=>1,'min'=>0), 
		                        <else/>
			                        <if condition="($tableInfo['data_type'] eq 'tinytext') OR ($tableInfo['data_type'] eq 'text') OR ($tableInfo['data_type'] eq 'mediumtext') OR ($tableInfo['data_type'] eq 'longtext')">    
								    	'{$tableInfo[$columnNameKey]}'=>array('inType' => 'textarea'),
			                        <else/>
					    				'{$tableInfo[$columnNameKey]}'=>array('inType' => 'text','required'=>1),  
			                        </if>		                        
		                        </if>							
					    	</if>
                        </if>				    	
				    	<php>echo "\r\n\t\t\t";</php>
                    </if>                  
                </if>		    	
		    </volist>                                                  
		);

		return $return_form_field_dict;
    }	